//
//  NYSubjectAnalysisRequest.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/5.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYSubjectAnalysisRequest.h"

@implementation NYSubjectAnalysisRequest
+ (instancetype)requestWithType:(NYSubjectAnalysisType)type param:(NSDictionary *)param
{
        NYSubjectAnalysisRequest *request = [super requestWithParams:param];
        request.analysisType = type;
        return request;
}
- (NSString *)url
{
        switch (self.analysisType) {
                case NYSubjectAnalysisTypeGoodSubject:
                        return @"/member/goodQuestionAnalysis";
                        break;
                case NYSubjectAnalysisTypeWrongSubject:
                        return @"/member/wrongQuestionAnalysis";
                        break;
                case NYSubjectAnalysisTypeExamine:
                        return @"/examine/analysis";
                        break;
                case NYSubjectAnalysisTypeCutGame:
                        return @"/cup/analysis";
                        break;
                case NYSubjectAnalysisTypeExercise:
                        return @"/video/analysis";
                        break;
                case NYSubjectAnalysisTypeExaminationAnalysis:
                        return @"/video/examination_analysis";
                        break;
                default:
                        break;
        }
        return @"/member/goodQuestionAnalysis";
}

- (NSMutableDictionary *)defaultParams
{
        return @{
                 kRequestKeyUser_ID : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.user_id),
                 kRequestKeyChannel : @(NYUserManager.channelID),
                 kRequestKeyLoginCode : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.logincode),
                 }.mutableCopy;
}
@end
